﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using l1cs.server.utils;

namespace l1cs.server.serverpackets
{
    public class S_HouseMap : ServerBasePacket
    {
        private static Logger _log = Logger.getLogger( typeof( S_HouseMap ).FullName );
 
        private byte[] _byte = null;

        public S_HouseMap( int objectId, String house_number )
        {
            buildPacket( objectId, house_number );
        }

        private void buildPacket( int objectId, String house_number )
        {
            int number = SqlUtils.toInt( house_number );

            writeC( Opcodes.S_OPCODE_HOUSEMAP );
            writeD( objectId );
            writeD( number );
        }

        override
        public byte[] getContent()
        {
            if ( _byte == null )
            {
                _byte = getBytes();
            }
            return _byte;
        }

        override
        public String getType()
        {
            return "[S] S_HouseMap";
        }
    }
}
